package com.fare.taluo.application.plane.channel;

import java.util.List;

import com.fare.taluo.vo.auth.UserInfoVO;
import com.fare.taluo.vo.core.SourceEntityVO;
import com.fare.taluo.vo.core.SourceTempVO;


public interface SourceApplication {
	
	public SourceEntityVO find(Long id);
	
	/**
	 * 返回查询抓取网站数据
	 * @param name
	 * @param url
	 * @param webTyle 网站类型(1.官网，2。代理,0，表示渠道)
	 * @return
	 */
	public List<SourceEntityVO> findSourceEntityListByConditions(String name,String url,String webTyle,String sorttype,int pageNum,int pageSize);
	
	/**
	 * 
	 * 更新
	 * @param id
	 * @param crawlStatus 1.表示系统从这些网站抓数；0.表示系统不到这些网站抓数。
	 * @param user
	 * @return
	 */
	public SourceEntityVO updateSourceEntity(Long id,Integer crawlStatus,UserInfoVO user);
	
	/**
	 * 返回查询总个数
	 * @param name
	 * @param url
	 * @param webTyle 网站类型(1.官网，2。代理)
	 * @return
	 */
	public int getSourceEntityCount(String name,String url,String webTyle);
	
	public List<SourceEntityVO> findAllSourceEntity();
	
	public List<SourceEntityVO> findSourceEntityByName(String name);
	
	
	/**
	 * 通过crawlStatus查询source
	 * */
	public List<SourceEntityVO> findBycrawlStatus(int crawlStatus);
	
	public List<SourceEntityVO> findSourceEntityListByLine(String fromCity,
			String toCity);
	
	public List<SourceEntityVO> findSourceEntityListByCrawlLine(String fromCity,
			String toCity);
	
	public List<SourceTempVO> findSourceEntityListByCarrierKey(String carrierKey);
	
	public SourceEntityVO findByHbaseKey(String hbaseKey);
	
	/**
	 * 找出所有处于抓取状态的航空公司
	 * @return
	 * @throws Exception
	 */
	public List<SourceEntityVO> findCrawlAirCompanys() throws Exception;
	/**
	 * 找出所有处于抓取状态的渠道vo
	 * @return
	 * @throws Exception
	 */
	public List<SourceEntityVO> findCrawlChannel() throws Exception;

	public List<SourceEntityVO> findByCarrierKey(String carrierKey);
}
